package com.ds.dsm.aggregation.module;

import com.ds.dsm.aggregation.module.service.ModuleConfigService;
import com.ds.esd.custom.annotation.CustomAnnotation;
import com.ds.esd.custom.annotation.FieldAnnotation;
import com.ds.esd.custom.bean.CustomModuleBean;
import com.ds.esd.custom.form.annotation.FormAnnotation;
import com.ds.esd.custom.form.enums.CustomFormMenu;
import com.ds.esd.custom.toolbar.BottomBarMenu;
import com.ds.esd.tool.ui.component.dialog.DialogBean;
import com.ds.esd.tool.ui.enums.ComponentType;
import com.ds.esd.tool.ui.enums.Dock;
import com.ds.esd.tool.ui.enums.PosType;
@BottomBarMenu
@FormAnnotation(col = 2,customService = ModuleConfigService.class,  bottombarMenu = CustomFormMenu.Save)
public class ModuleWinBean {

    @CustomAnnotation(hidden = true, pid = true)
    String viewInstId;

    @CustomAnnotation(hidden = true, pid = true)
    String  sourceClassName;
    ;

    @CustomAnnotation(hidden = true, uid = true)
    String methodName;


    @CustomAnnotation(caption = "窗口宽度")
    String width;
    @CustomAnnotation(caption = "窗口高度")
    String height;
    @CustomAnnotation(caption = "图标")
    String imageClass;

    @CustomAnnotation(caption = "平铺")
    Dock dock;

    @CustomAnnotation(caption = "位置")
    PosType pos;


    @CustomAnnotation(caption = "是否锁定")
    Boolean locked;

    @CustomAnnotation(caption = "自动展开")
    Boolean folded;

    @CustomAnnotation(caption = "显示刷新按钮")
    Boolean refreshBtn;

    @CustomAnnotation(caption = "显示帮助按钮")
    Boolean infoBtn;

    @CustomAnnotation(caption = "显示恢复按钮")
    Boolean minBtn;

    @CustomAnnotation(caption = "显示最大按钮")
    Boolean maxBtn;

    @CustomAnnotation(caption = "拖动大小")
    Boolean resizer;

    @CustomAnnotation(caption = "启用弹出")
    Boolean dio;
    @CustomAnnotation(caption = "模式对话框")
    Boolean modal;
    @CustomAnnotation(caption = "对话框可拖动")
    Boolean movable;

    @CustomAnnotation(caption = "显示钉针按钮")
    Boolean pinBtn;
    @CustomAnnotation(caption = "显示降落按钮")
    Boolean landBtn;
    @CustomAnnotation(caption = "命令窗口")
    Boolean cmd;
    @CustomAnnotation(caption = "页面缓存")
    Boolean cache;
    @CustomAnnotation(caption = "动态装载")
    Boolean dynLoad;


    @CustomAnnotation(caption = "最小宽度限制")
    String minWidth;
    @CustomAnnotation(caption = "最小高度限制")
    String minHeight;

    @CustomAnnotation(caption = "最小")
    Integer min;
    @CustomAnnotation(caption = "最大")
    Integer max;

    @FieldAnnotation(colSpan = -1)
    @CustomAnnotation(caption = "对话框弹出源")
    String fromRegion;

    @FieldAnnotation( componentType = ComponentType.CodeEditor, colSpan = -1)
    @CustomAnnotation(caption = "样式")
    String cssStyle;


    public ModuleWinBean() {

    }

    public ModuleWinBean(CustomModuleBean dataBean, DialogBean dialogBean) {

        this.methodName = dataBean.getMethodName();
        this.viewInstId = dataBean.getViewInstId();
        this.sourceClassName = dataBean.getSourceClassName();
        this.refreshBtn = dataBean.getRefreshBtn();
        this.infoBtn = dataBean.getInfoBtn();
        this.height = dataBean.getHeight();
        this.width = dataBean.getWidth();
        this.movable = dialogBean.getMovable();
        this.minBtn = dialogBean.getMinBtn();
        this.maxBtn = dialogBean.getMaxBtn();
        this.resizer = dialogBean.getResizer();
        this.pinBtn = dialogBean.getPinBtn();
        this.landBtn = dialogBean.getLandBtn();
        this.minWidth = dataBean.getMinWidth();
        this.minHeight = dataBean.getMinHeight();
        this.modal = dialogBean.getModal();
        this.imageClass = dataBean.getImageClass();
        this.cmd = dialogBean.getCmd();

        this.folded = dataBean.getFolded();
        this.cache = dataBean.getCache();
        this.fromRegion = dataBean.getFromRegion();
        this.dock = dataBean.getDock();
        this.dynLoad = dataBean.getDynLoad();
    }


    public Boolean getRefreshBtn() {
        return refreshBtn;
    }

    public void setRefreshBtn(Boolean refreshBtn) {
        this.refreshBtn = refreshBtn;
    }

    public Boolean getInfoBtn() {
        return infoBtn;
    }

    public void setInfoBtn(Boolean infoBtn) {
        this.infoBtn = infoBtn;
    }

    public String getCssStyle() {
        return cssStyle;
    }

    public void setCssStyle(String cssStyle) {
        this.cssStyle = cssStyle;
    }

    public String getImageClass() {
        return imageClass;
    }

    public void setImageClass(String imageClass) {
        this.imageClass = imageClass;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Integer getMin() {
        return min;
    }

    public void setMin(Integer min) {
        this.min = min;
    }

    public Integer getMax() {
        return max;
    }

    public void setMax(Integer max) {
        this.max = max;
    }

    public Boolean getCmd() {
        return cmd;
    }

    public void setCmd(Boolean cmd) {
        this.cmd = cmd;
    }

    public Boolean getLocked() {
        return locked;
    }

    public void setLocked(Boolean locked) {
        this.locked = locked;
    }

    public Boolean getFolded() {
        return folded;
    }

    public void setFolded(Boolean folded) {
        this.folded = folded;
    }

    public Boolean getCache() {
        return cache;
    }

    public void setCache(Boolean cache) {
        this.cache = cache;
    }

    public String getFromRegion() {
        return fromRegion;
    }

    public void setFromRegion(String fromRegion) {
        this.fromRegion = fromRegion;
    }

    public Dock getDock() {
        return dock;
    }

    public void setDock(Dock dock) {
        this.dock = dock;
    }

    public PosType getPos() {
        return pos;
    }

    public void setPos(PosType pos) {
        this.pos = pos;
    }


    public Boolean getDynLoad() {
        return dynLoad;
    }

    public void setDynLoad(Boolean dynLoad) {
        this.dynLoad = dynLoad;
    }

    public String getViewInstId() {
        return viewInstId;
    }

    public void setViewInstId(String viewInstId) {
        this.viewInstId = viewInstId;
    }

    public String getSourceClassName() {
        return sourceClassName;
    }

    public void setSourceClassName(String sourceClassName) {
        this.sourceClassName = sourceClassName;
    }

    public String getWidth() {
        return width;
    }

    public void setWidth(String width) {
        this.width = width;
    }

    public String getHeight() {
        return height;
    }

    public void setHeight(String height) {
        this.height = height;
    }


    public Boolean getDio() {
        return dio;
    }

    public void setDio(Boolean dio) {
        this.dio = dio;
    }

    public Boolean getMovable() {
        return movable;
    }

    public void setMovable(Boolean movable) {
        this.movable = movable;
    }

    public Boolean getMinBtn() {
        return minBtn;
    }

    public void setMinBtn(Boolean minBtn) {
        this.minBtn = minBtn;
    }

    public Boolean getMaxBtn() {
        return maxBtn;
    }

    public void setMaxBtn(Boolean maxBtn) {
        this.maxBtn = maxBtn;
    }

    public Boolean getResizer() {
        return resizer;
    }

    public void setResizer(Boolean resizer) {
        this.resizer = resizer;
    }

    public Boolean getPinBtn() {
        return pinBtn;
    }

    public void setPinBtn(Boolean pinBtn) {
        this.pinBtn = pinBtn;
    }

    public Boolean getLandBtn() {
        return landBtn;
    }

    public void setLandBtn(Boolean landBtn) {
        this.landBtn = landBtn;
    }

    public String getMinWidth() {
        return minWidth;
    }

    public void setMinWidth(String minWidth) {
        this.minWidth = minWidth;
    }

    public String getMinHeight() {
        return minHeight;
    }

    public void setMinHeight(String minHeight) {
        this.minHeight = minHeight;
    }

    public Boolean getModal() {
        return modal;
    }

    public void setModal(Boolean modal) {
        this.modal = modal;
    }
}
